package org.colcon.web.model.vote;

import org.colcon.web.model.framework.IDecision;

public class YesNoVote extends BooleanVote
{
	private static final long serialVersionUID = -3533947064737938950L;

	private IDecision decision;
	
	public YesNoVote(String group, String id, int length, int quorum, String[] titles, IDecision decision) 
	{
		super(group, id, length, quorum, titles, decision);
		
		this.decision = decision;
	}
	
	public boolean getBoolean() 
	{
		return getVotes(true) > getVotes(false);
	}
	
	public String getText()
	{
		return "If this vote passes, the following will be implemented: " + decision.getId();
	}
}
